<?php
/* @var $this CategoryController */
/* @var $model Category */

$this->breadcrumbs=array(
	'Categories'=>array('index'),
	'List',
);

if(isset(Yii::app()->session['adminUser'])){
	$this->menu=array(
		array('label'=>'Create Category', 'url'=>array('create')),
	);
}else{
	$this->menu=array(
		array('label'=>'- No Action -', 'url'=>array('')),
	);
}
/*
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#category-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");*/
?>

<h1>List Categories</h1>

<?php 

$myclass = get_class($this);
$myclass= strstr($myclass,'Controller',true);
$tempFullAction=false;

if(Yii::app()->user->level=='warehouse'  || isset(Yii::app()->session['adminUser']) ){
	$tempFullAction=true;
}

$this->widget('application.extensions.tablesorter.Sorter', array(
    'data'=>$records,
    'columns'=>array(
		'category',
	),
	'filters'=>array(
        '',
    ),
    'view'=>$myclass,
    'fullAction'=>$tempFullAction,
	'model'=>1,
));

?>
